<template>
    <Tabs value="name1">
        <TabPane label="新闻" name="name1">
            <Tree :data="tree1"></Tree>
        </TabPane>
        <TabPane label="产品" name="name2">
            <!-- <Tree :data="tree2"></Tree> -->
        </TabPane>
        <TabPane label="相册" name="name3">
            <!-- <Tree :data="tree3"></Tree> -->
        </TabPane>
    </Tabs>
</template>
<script>
    export default {
        data(){
            return{
                tree1:[],
                // tree2:[],
                // tree3:[],
                model:'cate',
                filter:{
                    title:'',
                    type:'',
                    parentId:''
                },
            }
        },
        methods:{
            getNews(){
                this.axios({
                    method: 'get',
                    url: `http://localhost:3000/${this.model}/list/1`
                }).then(res=>{
                    this.tree1=res.data
                })
            }
        },
        mounted(){
            this.getNews()
        }
    }
</script>